package jpaperwork.utils;

import java.lang.reflect.Field;
import java.util.Iterator;

/**
 * User: fleipold
 * Date: Jun 22, 2009
 * Time: 4:55:26 PM
 */
public class ReflectionUtils {
    public static Field getDeclaredField(Class clazz, String name){
        for (Field field : clazz.getDeclaredFields()) {
            if (name.equals(field.getName())){
                return field;
            }

        }

        throw new IllegalArgumentException("No field '"+name+"' in class " + clazz.getName());
    }
}
